import Vue from 'vue'
import App from './App.vue'

import MyDirective from '@/directives/index'
import Longpress from '@/directives/longpress'
import scopedId from '@/directives/scopedId'
import ElementUI, { Tooltip, Button } from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import rewriteElTooltip from '@/utils/rewriteElTooltip' // 引入重写el-tooltip的方法
import rewriteElButton from '@/utils/rewriteElButton' // 引入重写el-button的方法
import router from '@/router'
import Bus from '@/utils/Bus' // 引入事件总线Bus
import highlight from '@/plugin/highlight'
import vueEllipsis from '@/plugin/vue-ellipsis/index'
import 'leaflet/dist/leaflet.css'; // 引入leaflet地图的样式
import MyTable from '@/plugin/MyTable/index' // 引入my-table插件

rewriteElTooltip(Tooltip) // 重写el-tooltip的方法 注意一定要放在 Vue.use(ElementUI); 之前
rewriteElButton(Button)

Vue.use(ElementUI)
Vue.use(Longpress, { time: 1000 })
Vue.use(scopedId)
Vue.use(MyDirective)
Vue.use(vueEllipsis)
Vue.use(MyTable)

Vue.prototype.$bus = Bus

Vue.config.productionTip = false

new Vue({
    render: (h) => h(App),
    router,
}).$mount('#app')
